import type { RouteRecordRaw } from 'vue-router';
import RouterView from '@/layout/routerView/index.vue';
import menuIcon from '@/assets/menuIcon/menu2.png';

const moduleName = 'project';

const routes: Array<RouteRecordRaw> = [
  {
    path: '/project',
    name: moduleName,
    component: RouterView,
    redirect: '/project/manage',
    meta: {
      title: '项目管理',
      icon: menuIcon,
    },
    children: [
      {
        path: 'manage',
        name: `${moduleName}-manage`,
        component: () => import('@/views/project/manage/index.vue'),
        meta: {
          title: '项目列表',
        },
      },
      {
        path: 'contract',
        name: `${moduleName}-contract`,
        component: () => import('@/views/project/contract/index.vue'),
        meta: {
          title: '合同管理',
        },
      },
    ],
  },
];

export default routes;
